I=-I./include -I/usr/local/cern/geant4.9.4.p01/include -I/usr/local/cern/root/include
L=$(shell root-config --libs) -L/usr/local/lib/ -lCLHEP-Random-2.1.0.1
F=-std=gnu++0x
C=g++

all: kdmtoemul

clean:
	rm ./build/*
	
kdmtoemul: SimDataReader DataWriter PeakReference
	$C $F $I $L -o bin/kdmtoemul src/main.cpp build/*.o

SimDataReader:
	$C $F $I -c -o build/SimDataReader.o src/SimDataReader.cpp
	
DataWriter:
	$C $F $I -c -o build/DataWriter.o src/DataWriter.cpp
	
PeakReference:
	$C $F $I -c -o build/PeakReference.o src/PeakReference.cpp